SLD Resolution
   HOME

TheInfoList



OR:

SLD resolution (''Selective Linear Definite'' clause resolution) is the basic
inference rule In the philosophy of logic, a rule of inference, inference rule or transformation rule is a logical form consisting of a function which takes premises, analyzes their syntax, and returns a conclusion (or conclusions). For example, the rule of in ...
used in
logic programming Logic programming is a programming paradigm which is largely based on formal logic. Any program written in a logic programming language is a set of sentences in logical form, expressing facts and rules about some problem domain. Major logic prog ...
. It is a refinement of
resolution Resolution(s) may refer to: Common meanings * Resolution (debate), the statement which is debated in policy debate * Resolution (law), a written motion adopted by a deliberative body * New Year's resolution, a commitment that an individual mak ...
, which is both
sound In physics, sound is a vibration that propagates as an acoustic wave, through a transmission medium such as a gas, liquid or solid. In human physiology and psychology, sound is the ''reception'' of such waves and their ''perception'' by the ...
and refutation
complete Complete may refer to: Logic * Completeness (logic) * Completeness of a theory, the property of a theory that every formula in the theory's language or its negation is provable Mathematics * The completeness of the real numbers, which implies t ...
for
Horn clause In mathematical logic and logic programming, a Horn clause is a logical formula of a particular rule-like form which gives it useful properties for use in logic programming, formal specification, and model theory. Horn clauses are named for the log ...
s.


The SLD inference rule

Given a goal clause, represented as the negation of a problem to be solved : \neg L_1 \lor \cdots \lor \neg L_i \lor \cdots \lor \neg L_n with selected literal \neg L_i , and an input
definite clause In mathematical logic and logic programming, a Horn clause is a logical formula of a particular rule-like form which gives it useful properties for use in logic programming, formal specification, and model theory. Horn clauses are named for the logi ...
: L \lor \neg K_1 \lor \cdots \lor \neg K_m whose positive literal (atom) L\, unifies with the atom L_i \, of the selected literal \neg L_i \, , SLD resolution derives another goal clause, in which the selected literal is replaced by the negative literals of the input clause and the unifying substitution \theta \, is applied: (\neg L_1 \lor \cdots \lor \neg K_1 \lor \cdots \lor \neg K_m\ \lor \cdots \lor \neg L_n)\theta In the simplest case, in propositional logic, the atoms L_i \, and L \, are identical, and the unifying substitution \theta \, is vacuous. However, in the more general case, the unifying substitution is necessary to make the two literals identical.


The origin of the name "SLD"

The name "SLD resolution" was given by Maarten van Emden for the unnamed inference rule introduced by
Robert Kowalski Robert Anthony Kowalski (born 15 May 1941) is an American-British logician and computer scientist, whose research is concerned with developing both human-oriented models of computing and computational models of human thinking. He has spent mo ...
. Its name is derived from SL resolution, which is both sound and refutation complete for the unrestricted clausal form of logic. "SLD" stands for "SL resolution with Definite clauses". In both, SL and SLD, "L" stands for the fact that a resolution proof can be restricted to a linear sequence of clauses: C_1, C_2, \cdots, C_l where the "top clause" C_1 \, is an input clause, and every other clause C_ \, is a resolvent one of whose parents is the previous clause C_i \, . The proof is a refutation if the last clause C_l \, is the empty clause. In SLD, all of the clauses in the sequence are goal clauses, and the other parent is an input clause. In SL resolution, the other parent is either an input clause or an ancestor clause earlier in the sequence. In both SL and SLD, "S" stands for the fact that the only literal resolved upon in any clause C_i \, is one that is uniquely selected by a selection rule or selection function. In SL resolution, the selected literal is restricted to one which has been most recently introduced into the clause. In the simplest case, such a last-in-first-out selection function can be specified by the order in which literals are written, as in
Prolog Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily ...
. However, the selection function in SLD resolution is more general than in SL resolution and in Prolog. There is no restriction on the literal that can be selected.


The computational interpretation of SLD resolution

In clausal logic, an SLD refutation demonstrates that the input set of clauses is unsatisfiable. In logic programming, however, an SLD refutation also has a computational interpretation. The top clause \neg L_1 \lor \cdots \lor \neg L_i \lor \cdots \lor \neg L_n can be interpreted as the denial of a conjunction of subgoals L_1 \land \cdots \land L_i \land \cdots \land L_n . The derivation of clause C_ \, from C_i \, is the derivation, by means of
backward reasoning Backward chaining (or backward reasoning) is an inference method described colloquially as working backward from the goal. It is used in automated theorem provers, inference engines, proof assistants, and other artificial intelligence application ...
, of a new set of sub-goals using an input clause as a goal-reduction procedure. The unifying substitution \theta \, both passes input from the selected subgoal to the body of the procedure and simultaneously passes output from the head of the procedure to the remaining unselected subgoals. The empty clause is simply an empty set of subgoals, which signals that the initial conjunction of subgoals in the top clause has been solved.


SLD resolution strategies

SLD resolution implicitly defines a
search tree In computer science, a search tree is a tree data structure used for locating specific keys from within a set. In order for a tree to function as a search tree, the key for each node must be greater than any keys in subtrees on the left, and less ...
of alternative computations, in which the initial goal clause is associated with the root of the tree. For every node in the tree and for every definite clause in the program whose positive literal unifies with the selected literal in the goal clause associated with the node, there is a child node associated with the goal clause obtained by SLD resolution. A leaf node, which has no children, is a success node if its associated goal clause is the empty clause. It is a failure node if its associated goal clause is non-empty but its selected literal unifies with no positive literal of definite clauses in the program. SLD resolution is non-deterministic in the sense that it does not determine the search strategy for exploring the search tree. Prolog searches the tree depth-first, one branch at a time, using backtracking when it encounters a failure node.
Depth-first search Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible alon ...
is very efficient in its use of computing resources, but is incomplete if the search space contains infinite branches and the search strategy searches these in preference to finite branches: the computation does not terminate. Other search strategies, including
breadth-first Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior to moving on to the nodes at the next de ...
, best-first, and
branch-and-bound Branch and bound (BB, B&B, or BnB) is an algorithm design paradigm for discrete and combinatorial optimization problems, as well as mathematical optimization. A branch-and-bound algorithm consists of a systematic enumeration of candidate solutio ...
search are also possible. Moreover, the search can be carried out sequentially, one node at a time, or in parallel, many nodes simultaneously. SLD resolution is also non-deterministic in the sense, mentioned earlier, that the selection rule is not determined by the inference rule, but is determined by a separate decision procedure, which can be sensitive to the dynamics of the program execution process. The SLD resolution search space is an or-tree, in which different branches represent alternative computations. In the case of propositional logic programs, SLD can be generalised so that the search space is an and-or tree, whose nodes are labelled by single literals, representing subgoals, and nodes are joined either by conjunction or by disjunction. In the general case, where conjoint subgoals share variables, the and-or tree representation is more complicated.


Example

Given the logic program: q :- p. p. and the top-level goal: q. the search space consists of a single branch, in which q is reduced to p which is reduced to the empty set of subgoals, signalling a successful computation. In this case, the program is so simple that there is no role for the selection function and no need for any search. In clausal logic, the program is represented by the set of clauses: q \lor \neg p p \, and top-level goal is represented by the goal clause with a single negative literal: \neg q The search space consists of the single refutation: \neg q, \neg p, \mathit where \mathit \, represents the empty clause. If the following clause were added to the program: q :- r. then there would be an additional branch in the search space, whose leaf node r is a failure node. In Prolog, if this clause were added to the front of the original program, then Prolog would use the order in which the clauses are written to determine the order in which the branches of the search space are investigated. Prolog would try this new branch first, fail, and then backtrack to investigate the single branch of the original program and succeed. If the clause p :- p. were now added to the program, then the search tree would contain an infinite branch. If this clause were tried first, then Prolog would go into an infinite loop and not find the successful branch.


SLDNF

SLDNF Krzysztof Apt and Maarten van Emden
Contributions to the Theory of Logic Programming
Journal of the Association for Computing Machinery. Vol, 1982 - portal.acm.org
is an extension of SLD resolution to deal with
negation as failure Negation as failure (NAF, for short) is a non-monotonic inference rule in logic programming, used to derive \mathrm~p (i.e. that ~p is assumed not to hold) from failure to derive ~p. Note that \mathrm ~p can be different from the statement \neg p ...
. In SLDNF, goal clauses can contain negation as failure literals, say of the form not(p) \, , which can be selected only if they contain no variables. When such a variable-free literal is selected, a subproof (or subcomputation) is attempted to determine whether there is an SLDNF refutation starting from the corresponding unnegated literal p \, as top clause. The selected subgoal not(p) \, succeeds if the subproof fails, and it fails if the subproof succeeds.


See also

*
John Alan Robinson John Alan Robinson (9 March 1930 – 5 August 2016) was a philosopher, mathematician, and computer scientist. He was a professor emeritus at Syracuse University. Alan Robinson's major contribution is to the foundations of automated theorem pr ...


References

*
Jean Gallier Jean Henri Gallier (born 1949) is a researcher in computational logic at the University of Pennsylvania, where he holds appointments in the Computer and Information Science Department and the Department of Mathematics. Biography Gallier was born J ...
,
SLD-Resolution and Logic Programming
' chapter 9 of

', 2003 online revision (free to download), originally published by Wiley, 1986 * John C. Shepherdson, ''SLDNF-Resolution with Equality'', Journal of Automated Reasoning 8: 297-306, 1992; defines semantics with respect to which SLDNF-resolution with equality is sound and complete


External links



Definition from the Free On-Line Dictionary of Computing {{DEFAULTSORT:Sld Resolution Logic programming Rules of inference